import { request } from "@/api/request"

export const $approval = {
  // 查询
  search: data => request({
    // url: 'inner/apply/searchVehicleApprovalInfo',
    url: 'innerHandheld/apply/searchVehicleApprovalInfo',
    method: 'post',
    data
  }),
  // 审批 同意
  applyOk: data => request({
    url: 'innerHandheld/apply/vehicleApproval',
    method: 'post',
    data
  }),
  // 审批20000以下
  applyDown: data => request({
    url: 'innerHandheld/apply/vehicleApprovalDown',
    method: 'post',
    data
  }),
  // 复核
  twoVehicleApproval: data => request({
    url: 'innerHandheld/apply/twoVehicleApproval',
    method: 'post',
    data
  }),
  // 撤销
  delete: data => request({
    url: 'innerHandheld/apply/passedNotSendToRevoke',
    method: 'post',
    data
  }),
  // 分拨
  distribution: data => request({
    url: 'innerHandheld/apply/passedNotSendToDistribution',
    method: 'post',
    data
  }),
  // 转换类型
  changeDanger: data => request({
    url: 'innerHandheld/apply/changeDanger',
    method: 'post',
    data
  }),
  // 文件图片查看
  loadFile: params => request({
    url: 'inner/air/state/loadFile',
    // responseType: 'blob',
    method: 'post',
    responseType: 'arraybuffer',
    data: params
  }),
  // 获取菜单权限
  getInfo: () => request({
    url: '/sys/info',
    method: 'get',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}
